package com.dmpp.mes.controller;


import com.dmpp.mes.bean.ResponseData;
import com.dmpp.mes.parameterInfo.Aroma;
import com.dmpp.mes.parameterInfo.User;
import com.dmpp.mes.service.AromaService;
import com.dmpp.mes.service.UserServer;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@CrossOrigin
@RestController
@RequestMapping("User")
public class UserController {
//用户
    @Autowired
    private UserServer service;

    @CrossOrigin("http://localhost:8080/#/home")
    @RequestMapping(value = "/Login", method = RequestMethod.POST)
    @ResponseBody
    public ResponseData login(User user) {
        return service.login(user);
    }


    @RequestMapping(value = "/FindAll", method = RequestMethod.POST)
    @ResponseBody
    public ResponseData findAll(User user) {
        return service.findAll(user);
    }

}
